package com.ruoyi.hire.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hire.mapper.HireOfflineLectureMapper;
import com.ruoyi.hire.domain.HireOfflineLecture;
import com.ruoyi.hire.service.IHireOfflineLectureService;

import javax.annotation.Resource;

/**
 * 线下宣讲会管理Service业务层处理
 *
 * @author linyang
 * @date 2025-07-21
 */
@Service
public class HireOfflineLectureServiceImpl implements IHireOfflineLectureService {

    @Resource
    private HireOfflineLectureMapper hireOfflineLectureMapper;

    /**
     * 查询线下宣讲会管理
     *
     * @param id 线下宣讲会管理主键
     * @return 线下宣讲会管理
     */
    @Override
    public HireOfflineLecture selectHireOfflineLectureById(Long id) {
        return hireOfflineLectureMapper.selectHireOfflineLectureById(id);
    }

    /**
     * 查询线下宣讲会管理列表
     *
     * @param hireOfflineLecture 线下宣讲会管理
     * @return 线下宣讲会管理
     */
    @Override
    public List<HireOfflineLecture> selectHireOfflineLectureList(HireOfflineLecture hireOfflineLecture) {
        return hireOfflineLectureMapper.selectHireOfflineLectureList(hireOfflineLecture);
    }

    /**
     * 新增线下宣讲会管理
     *
     * @param hireOfflineLecture 线下宣讲会管理
     * @return 结果
     */
    @Override
    public int insertHireOfflineLecture(HireOfflineLecture hireOfflineLecture) {
        return hireOfflineLectureMapper.insertHireOfflineLecture(hireOfflineLecture);
    }

    /**
     * 修改线下宣讲会管理
     *
     * @param hireOfflineLecture 线下宣讲会管理
     * @return 结果
     */
    @Override
    public int updateHireOfflineLecture(HireOfflineLecture hireOfflineLecture) {
        hireOfflineLecture.setUpdateTime(DateUtils.getNowDate());
        return hireOfflineLectureMapper.updateHireOfflineLecture(hireOfflineLecture);
    }

    /**
     * 批量删除线下宣讲会管理
     *
     * @param ids 需要删除的线下宣讲会管理主键
     * @return 结果
     */
    @Override
    public int deleteHireOfflineLectureByIds(Long[] ids) {
        return hireOfflineLectureMapper.deleteHireOfflineLectureByIds(ids);
    }

    /**
     * 删除线下宣讲会管理信息
     *
     * @param id 线下宣讲会管理主键
     * @return 结果
     */
    @Override
    public int deleteHireOfflineLectureById(Long id) {
        return hireOfflineLectureMapper.deleteHireOfflineLectureById(id);
    }
}
